<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common-app/taglibs.jsp"%>


<!DOCTYPE html>
<head>
<link href="${res_app}/css/wuxi.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${res}/js/validate/irisvalidator.js"></script>
<script type="text/javascript" src="${res}/js/jquery/jquery.json.js"></script>
<script type="text/javascript"src="${res}/js/proposal/irisPrpPrepare.js"></script>
<script type="text/javascript"src="${res_app}/js/app/proposal/irisPrpPrepare.js"></script>

<title>申报特例处理</title>

<script type="text/javascript">

</script>

</head>
<body>
	<div class="soBox">
		<div class="detail ico_search">
			<table>
				<tr>
					<td rowspan="2"><strong>检索条件：</strong></td>
					<td><cpt:search key="rantSpecial_modify" repeatColumn="3"
							displayCount="3" leftStyle="width:80px"></cpt:search></td>
				</tr>
				<tr>
					<td>
						<div class="clear_h10"></div> <input type='button' id='searchBt'
						class="button_an" value='查询' /> <input id="cleanBtn"
							name="searchBt" type="button" class="button_an_clean" value="重置" />
					</td>
				</tr>

			</table>
		</div>
	</div> 
	<div class="clear_h10"></div>
	<div>
		<div id='TopBarMnt'></div>
		<table id='dataGrid'></table>
		<div id='dataBar'></div>
	</div>
	<div class="clear_h10"></div>
	
	<script type="text/javascript">
	
		var irisGrid = new IrisGrid("dataGrid", "dataBar", 'TopBarMnt');
		var prcWin = new progressWin("${res}");//初始化遮罩层

		/** 表格初始化**/
		//loadIrisGrid("${res}");
		function buildGrid() {
			var columnAttrList = new Array();

			columnAttr = new ColumnAttr("申报单位", "org_name", "org_name", 3, "left",
					true);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("项目负责人", "zh_name", "zh_name", 3, "left",
					true);
			columnAttrList.push(columnAttr);

			columnAttr = new ColumnAttr("联系电话", "mobile", "mobile", 3,
					"left", true);
			columnAttrList.push(columnAttr);

			columnAttr = new ColumnAttr("手机号码", "tel", "tel", 3,
					"left", true);//表头，字段名，，，宽度比例，居左，是否需要表头排序
			columnAttrList.push(columnAttr);
	
			columnAttr = new ColumnAttr("项目类别", "org_type", "org_type", 3,
					"left", true);//表头，字段名，，，宽度比例，居左，是否需要表头排序
			columnAttrList.push(columnAttr);

			columnAttr = new ColumnAttr("业务年度", "stat_year", "stat_year",  2,
	            	"center", true, false, "text", false);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("截止日期", "end_date", "end_date",  2,
	            	"center", true);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("设置人", "operate_psn_name", "operate_psn_name",3,
					"center", true);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("设置时间", "operate_date", "operate_date",3,
					"center", true);
			columnAttrList.push(columnAttr);
			
			columnAttr = new ColumnAttr("操作", "操作", "操作", 3,
					"center", false);
			columnAttrList.push(columnAttr);
	
			irisGrid.setColumnAttrs(columnAttrList);
			irisGrid.setToolsBar([ {
				id : "addException",
				name : "新增申报特例 ",
				trigger : addException
			}]);

			irisGrid
					.setUrl("${ctx}/prpapprove/list-for-grant-special");//查询url
			irisGrid.setCaption("暂写");
			irisGrid.setDefaultSortName("org_name");//默认排序字段
			irisGrid.setDefaultSortorder("asc");
			irisGrid.setWidth(978);//整个表格宽度
			irisGrid.setCheckAble(false);//表格左边是否要复选框
			irisGrid.setShowRowIndex(true);//是否显示行号
			irisGrid.setCanExportExcel(true);//excel 导出
			irisGrid.setQueryBox('searchBt', 'rantSpecial_modify');//查询条件 按钮名，查询条件function_key
			irisGrid.setLoadComplete(setGray);//设置grid加载完成之后的动作
			
			irisGrid.onSelectAll = function(selectid, isSelect) {//全选事件
			}
			irisGrid.onSelectRow = function(selectid, isSelect) {//选择事件	

			}

			irisGrid.build();
		}

	

		jQuery(function() {
			buildGrid();
			setGray();
			$("#cleanBtn").click(function(){
				$("[id^='_dyn_criteria'][id$='_c']", "#rantSpecial_modify").each(function(){
					$(this).children().each(function(){
						$(this).val('');
					});
				});
			});
		});
		
		//审核页面调用该方法刷新页面
		function search() {
			$("#searchBt").click();
		}

		
		function setGray() {

		
			$("span[id^=request_amt_]").each(function(i, obj) {
                var id = $(obj).attr("id").replace("request_amt_", "");
             
				format_numberSpan("award_amt2_"+id,4);
				format_numberSpan("award_amt_"+id,4);

			});
			
		
			
			
		}
		
		
		function editGrantSpecial(id) {
			tb_show("修改申报特例", ctx
					+ "/prpapprove/editGrantSpecial?id="+id+"&TB_iframe=true&height=460&width=900",
					false);
		}
		function delGrantSpecia(id){
			if(confirm("确认要删除选中记录吗？")){
				window.location.href = "/egrantweb/prpapprove/delGrantSpecia?id="+id;
				
				
			}
		}
		function addException() {
			tb_show("新增申报特例", ctx
					+ "/prpapprove/addGrantSpecial?TB_iframe=true&height=460&width=900",
					false);
		}
		/**查看单位信息*/
		function orgInfoView(orgCode) {
			tb_show("查看单位信息",
					"${ctx}/orgmanage/verifyorg/org-info-view?orgCode="
							+ orgCode + "&TB_iframe=true&height=460&width=950",
					false);
		}
		function viewComment(prpCode, status,flag) {
			tb_show("修改意见", "${ctx}/appProject/viewComment?prpCode=" + prpCode
					+ "&status=" + status+ "&flag=" + flag
					+ "&TB_iframe=true&height=500&width=800", false);
		}

		function viewPrpCheckResults(prpCode){
			   tb_show("规则检查结果","${ctx}/prpapprove/prp-check-result?prpCode=" + prpCode
					     + "&TB_iframe=true&height=460&width=824", false);
		}
		
		
</script>
</body>
</html>